import { createRouter,createWebHashHistory,RouteRecordRaw } from "vue-router";

//组件
import login from "../Views/Login.vue";
import cuser from "../Views/CreateUser.vue";
import userlist from "../Views/UserList.vue"
import invests from "../Views/Admin/Invest/CreateInvest.vue"
import listinvest from "../Views/Admin/Invest/ListInvest.vue"
import listborrow from "../Views/Admin/Borrow/ListBI.vue"
import userrole from "../Views/UserRole.vue"
const routes : Array<RouteRecordRaw>=[
    {
        path:"/",
        redirect:"/login"
    },
    {
        path:"/login",
        name:"login",
        component:login
    },
    {
        path:"/createuser",
        name:"createuser",
        component:cuser
    },
    {
        path:"/userlist",
        name:"userlist",
        component:userlist
    },
    {
        path:"/createinvest",
        name:"createinvest",
        component:invests
    },
    {
        path:"/listinvest",
        name:"listinvest",
        component:listinvest
    },
    {
        path:"/listborrow",
        name:"listborrow",
        component:listborrow
    },
    {
        path:"/userrole/:uid/:uname",
        name:"userrole",
        component:userrole
    },

];

const router = createRouter({
    history:createWebHashHistory(),
    routes
});
export default router;


